home *** CD-ROM | disk | FTP | other *** search
- /*
- * the class KBAN_DRAW
- * Copyright (C) 1996, 1997 Kazutaka Hirata <khirata@jove.acs.unt.edu>
- */
-
- #include "stdafx.h"
-
- #include "common/base.h"
-
- #include "kbandef.h"
-
- #include "draw.h"
-
- KBAN_DRAW::KBAN_DRAW(
- CDC* pDC,
- const DRAW_INFO& grid,
- const FLAG& fill,
- const FLAG& hole,
- const FLAG* lflags
- )
- : SAFE_DRAW(pDC),
- m_grid(grid),
- m_fill(fill),
- m_hole(hole),
- m_lflags(lflags)
- {
- m_grid_origin = m_grid.get_grid_origin();
- m_main_grid_width = m_grid.get_main_grid_width();
- m_sub_grid_width = m_grid.get_sub_grid_width();
- m_grid_color = m_grid.get_grid_color();
- for(uint i = 0; i < LAYER_NUMBER; i++) {
- if(lflags[i].get()) {
- m_layer_attr [i].set(m_grid.get_layer_color(i), false);
- m_cursor_attr[i].set(m_grid.get_cursor_color(), true );
- m_target_attr[i].set(m_grid.get_target_color(), false);
- m_erase_attr [i].set(m_grid.get_erase_color (), false);
- } else {
- m_layer_attr [i].set(RGB(0, 0, 0), true);
- m_cursor_attr[i].set(RGB(0, 0, 0), true);
- m_target_attr[i].set(RGB(0, 0, 0), true);
- m_erase_attr [i].set(RGB(0, 0, 0), true);
- }
- }
- }
-
- void KBAN_DRAW::draw_sub_grid(void)
- {
- XY grid_origin = m_grid_origin;
- uint grid_width = m_sub_grid_width;
- XYT x;
- XYT xs = Y_MIN;
- for(x = grid_origin.x() % grid_width; x < X_MAX; x += grid_width) {
- XY ac(x, 0);
- XY pc;
- m_grid.xy_ac2pc(ac, pc);
- if(is_valid_x(pc.x())) {
- xs = x;
- break;
- }
- }
- XYT xe = Y_MAX;
- for(; x < X_MAX; x += grid_width) {
- XY ac(x, 0);
- XY pc;
- m_grid.xy_ac2pc(ac, pc);
- if(!is_valid_x(pc.x())) {
- xe = x;
- break;
- }
- }
- XYT y;
- XYT ys = Y_MIN;
- for(y = grid_origin.y() % grid_width; y < X_MAX; y += grid_width) {
- XY ac(0, y);
- XY pc;
- m_grid.xy_ac2pc(ac, pc);
- if(is_valid_y(pc.y())) {
- ys = y;
- break;
- }
- }
- XYT ye = Y_MAX;
- for(; y < X_MAX; y += grid_width) {
- XY ac(0, y);
- XY pc;
- m_grid.xy_ac2pc(ac, pc);
- if(!is_valid_y(pc.y())) {
- ye = y;
- break;
- }
- }
-
- set_pen(PS_SOLID, 1, m_grid_color);
- int xpoints = (xe - xs) / grid_width;
- XYT* points = new XYT[xpoints];
- for(uint ix = 0, px = xs; ix < xpoints; ix++, px += grid_width) {
- XY ac(px, 0);
- XY pc;
- m_grid.xy_ac2pc(ac, pc);
- points[ix] = pc.x();
- }
- for(y = ys; y < ye; y += grid_width) {
- XY ac(0, y);
- XY pc;
- m_grid.xy_ac2pc(ac, pc);
- for(uint ix = 0; ix < xpoints; ix++) {
- draw_point_core(points[ix], pc.y());
- }
- }
- delete points;
- }
-
- void KBAN_DRAW::draw_main_grid(void)
- {
- XY grid_origin = m_grid_origin;
- uint grid_width = m_main_grid_width;
- if(grid_width <= m_sub_grid_width) {
- return;
- }
- XYT x;
- XYT xs = Y_MIN;
- for(x = grid_origin.x() % grid_width; x < X_MAX; x += grid_width) {
- XY ac(x, 0);
- XY pc;
- m_grid.xy_ac2pc(ac, pc);
- if(is_valid_x(pc.x())) {
- xs = x;
- break;
- }
- }
- XYT xe = Y_MAX;
- for(; x < X_MAX; x += grid_width) {
- XY ac(x, 0);
- XY pc;
- m_grid.xy_ac2pc(ac, pc);
- if(!is_valid_x(pc.x())) {
- xe = x;
- break;
- }
- }
- XYT y;
- XYT ys = Y_MIN;
- for(y = grid_origin.y() % grid_width; y < X_MAX; y += grid_width) {
- XY ac(0, y);
- XY pc;
- m_grid.xy_ac2pc(ac, pc);
- if(is_valid_y(pc.y())) {
- ys = y;
- break;
- }
- }
- XYT ye = Y_MAX;
- for(; y < X_MAX; y += grid_width) {
- XY ac(0, y);
- XY pc;
- m_grid.xy_ac2pc(ac, pc);
- if(!is_valid_y(pc.y())) {
- ye = y;
- break;
- }
- }
-
- set_pen(PS_SOLID, 1, m_grid_color);
- int xpoints = (xe - xs) / grid_width;
- XYT* points = new XYT[xpoints];
- for(uint ix = 0, px = xs; ix < xpoints; ix++, px += grid_width) {
- XY ac(px, 0);
- XY pc;
- m_grid.xy_ac2pc(ac, pc);
- points[ix] = pc.x();
- }
- for(y = ys; y < ye; y += grid_width) {
- XY ac(0, y);
- XY pc;
- m_grid.xy_ac2pc(ac, pc);
- for(uint ix = 0; ix < xpoints; ix++) {
- draw_point_core(points[ix] , pc.y() );
- draw_point_core(points[ix] , pc.y() + 1);
- draw_point_core(points[ix] + 1, pc.y() );
- draw_point_core(points[ix] + 1, pc.y() + 1);
- }
- }
- delete points;
- }
-
- void KBAN_DRAW::draw_grid(void)
- {
- draw_sub_grid();
- draw_main_grid();
- }
-
- void KBAN_DRAW::draw_box_core(const XY& ac1, const XY& ac2, const DRAW_ATTR& attr)
- {
- XY pc1, pc2;
- m_grid.xy_ac2pc(ac1, pc1);
- m_grid.xy_ac2pc(ac2, pc2);
- COLORREF color = attr.color();
- draw_plain_box(pc1.x(), pc1.y(), pc2.x(), pc2.y(), color, FALSE, attr.xor());
- }
-
- void KBAN_DRAW::draw_primitive_pin_core(const PIN_ELEMENT& target, const DRAW_ATTR& attr)
- {
- XY pc;
- m_grid.xy_ac2pc(target.ac(), pc);
- XYT x = pc.x();
- XYT y = pc.y();
- const APERTURE& apt = target.apt();
- XYT w = m_grid.distance_ac2pc(apt.width());
- XYT h = m_grid.distance_ac2pc(apt.height());
- XYT r = w / 2;
- COLORREF temp_color = attr.color();
- bool xor = attr.xor();
-
- switch(apt.type()) {
- case APERTURE::APT_ROUND : {
- draw_plain_circle(x, y, r, temp_color, m_fill.get(), xor);
- break;
- }
- case APERTURE::APT_SQUARE : {
- int x1 = x - r;
- int y1 = y - r;
- int x2 = x + r - 1;
- int y2 = y + r - 1;
- draw_plain_box(x1, y1, x2, y2, temp_color, m_fill.get(), xor);
- break;
- }
- case APERTURE::APT_OBLONG : {
- if(w < h) {
- int y1 = y - h / 2 + w / 2;
- int y2 = y + h / 2 - w / 2;
- if(m_fill.get()) {
- draw_plain_vertical_line(x, y1, y2, w / 2, temp_color, xor);
- } else {
- draw_plain_circle(x, y1, w / 2, temp_color, m_fill.get(), xor);
- draw_plain_circle(x, y2, w / 2, temp_color, m_fill.get(), xor);
- draw_plain_vertical_line(x - w / 2, y1, y2, 1, temp_color, xor);
- draw_plain_vertical_line(x + w / 2, y1, y2, 1, temp_color, xor);
- }
- } else {
- int x1 = x - w / 2 + h / 2;
- int x2 = x + w / 2 - h / 2;
- if(m_fill.get()) {
- draw_plain_holizontal_line(x1, x2, y, w / 2, temp_color, xor);
- } else {
- draw_plain_circle(x1, y, h / 2, temp_color, m_fill.get(), xor);
- draw_plain_circle(x2, y, h / 2, temp_color, m_fill.get(), xor);
- draw_plain_holizontal_line(x1, x2, y - h / 2, 1, temp_color, xor);
- draw_plain_holizontal_line(x1, x2, y + h / 2, 1, temp_color, xor);
- }
- }
- break;
- }
- case APERTURE::APT_RECTANGLE : {
- int x1 = x - w / 2;
- int y1 = y - h / 2;
- int x2 = x + w / 2 - 1;
- int y2 = y + h / 2 - 1;
- draw_plain_box(x1, y1, x2, y2, temp_color, m_fill.get(), xor);
- break;
- }
- }
- }
-
- void KBAN_DRAW::draw_primitive_pin_hole_core(const PIN_ELEMENT& target, const DRAW_ATTR& attr)
- {
- if(m_fill.get() && m_hole.get()) {
- XY pc;
- m_grid.xy_ac2pc(target.ac(), pc);
- XYT x = pc.x();
- XYT y = pc.y();
- XYT dr = m_grid.distance_ac2pc(target.apt().drill()) / 2;
- COLORREF color = attr.color();
- draw_plain_circle(x, y, dr, color, TRUE, attr.xor());
- }
- }
-
- void KBAN_DRAW::draw_primitive_line_core(const LINE_ELEMENT& target, const DRAW_ATTR& attr)
- {
- XY pc_s, pc_e;
- m_grid.xy_ac2pc(target.ac_s(), pc_s);
- m_grid.xy_ac2pc(target.ac_e(), pc_e);
-
- XYT xs = pc_s.x(), ys = pc_s.y();
- XYT xe = pc_e.x(), ye = pc_e.y();
- XYT width = m_grid.distance_ac2pc(target.width());
- XYT r = width / 2;
- COLORREF color = attr.color();
- bool xor = attr.xor();
-
- if(m_fill.get()) {
- draw_plain_line(xs, ys, xe, ye, width, color, xor);
- } else {
- if(xs == xe) {
- if(xs + r - 1 < xmin()) {
- } else if(xmax() < xs - r) {
- } else {
- draw_plain_vertical_line(xs - r , ys, ye, 1, color, xor);
- draw_plain_vertical_line(xs + r - 1, ys, ye, 1, color, xor);
- draw_plain_circle(xs, ys, r, color, m_fill.get(), xor);
- draw_plain_circle(xe, ye, r, color, m_fill.get(), xor);
- }
- } else if(ys == ye) {
- if(ys + r - 1 < ymin()) {
- } else if(ymax() < ys + r) {
- } else {
- draw_plain_holizontal_line(xs, xe, ys - r , 1, color, xor);
- draw_plain_holizontal_line(xs, xe, ys + r - 1, 1, color, xor);
- draw_plain_circle(xs, ys, r, color, m_fill.get(), xor);
- draw_plain_circle(xe, ye, r, color, m_fill.get(), xor);
- }
- } else {
- if(max(xs, xe) + r - 1 < xmin()) {
- } else if(xmax() < min(xs, xe) + r) {
- } else if(max(ys, ye) + r - 1 < ymin()) {
- } else if(ymax() < min(ys, ye) + r) {
- } else {
- XY o(xs, ys);
- XY p(xe, ye);
- double rad = o.get_radian(p) + M_PI / 2;
- int dx = int(double(r) * cos(rad));
- int dy = int(double(r) * sin(rad));
- draw_plain_line(xs - dx, ys - dy, xe - dx, ye - dy, 1, color, xor);
- draw_plain_line(xs + dx, ys + dy, xe + dx, ye + dy, 1, color, xor);
- draw_plain_circle(xs, ys, r, color, m_fill.get(), xor);
- draw_plain_circle(xe, ye, r, color, m_fill.get(), xor);
- }
- }
- }
- }
-
- void KBAN_DRAW::draw_primitive_pin_list_core(const PIN_LIST& target, const DRAW_ATTR& attr)
- {
- PIN_LIST::iterator i;
- TRAVERSE(target, i) {
- const PIN_ELEMENT& current = *i;
- draw_primitive_pin_core(current, attr);
- }
- }
-
- void KBAN_DRAW::draw_primitive_pin_list_hole_core(const PIN_LIST& target, const DRAW_ATTR& attr)
- {
- PIN_LIST::iterator i;
- TRAVERSE(target, i) {
- const PIN_ELEMENT& current = *i;
- draw_primitive_pin_hole_core(current, attr);
- }
- }
-
- void KBAN_DRAW::draw_primitive_line_list_core(const LINE_LIST& target, const DRAW_ATTR& attr)
- {
- LINE_LIST::iterator i;
- TRAVERSE(target, i) {
- const LINE_ELEMENT& current = *i;
- draw_primitive_line_core(current, attr);
- }
- }
-
- void KBAN_DRAW::draw_primitive_layer_core(const LAYER& target, const DRAW_ATTR& attr)
- {
- draw_primitive_pin_list_core (target.pin_list() , attr);
- draw_primitive_line_list_core(target.line_list(), attr);
- }
-
- void KBAN_DRAW::draw_primitive_layer_hole_core(const LAYER& target, const DRAW_ATTR& attr)
- {
- draw_primitive_pin_list_hole_core(target.pin_list(), attr);
- }
-
- void KBAN_DRAW::draw_primitive_core(const PRIMITIVE& target, uint layer_no, const DRAW_ATTR& attr)
- {
- draw_primitive_layer_core(target.layer(layer_no), attr);
- }
-
- void KBAN_DRAW::draw_primitive_hole_core(const PRIMITIVE& target, uint layer_no, const DRAW_ATTR& attr)
- {
- draw_primitive_layer_hole_core(target.layer(layer_no), attr);
- }
-
- void KBAN_DRAW::draw_one_component_pin_list_core(const COMPONENT_ELEMENT& target, uint layer, const DRAW_ATTR& attr)
- {
- const PIN_LIST& list = target.layer(layer).pin_list();
- PIN_LIST::iterator i;
- TRAVERSE(list, i) {
- PIN_ELEMENT current = *i;
- current.set_ac(target.ac() + current.ac());
- draw_primitive_pin_core(current, attr);
- }
- }
-
- void KBAN_DRAW::draw_one_component_pin_list_hole_core(const COMPONENT_ELEMENT& target, uint layer, const DRAW_ATTR& attr)
- {
- const PIN_LIST& list = target.layer(layer).pin_list();
- PIN_LIST::iterator i;
- TRAVERSE(list, i) {
- PIN_ELEMENT current = *i;
- current.set_ac(target.ac() + current.ac());
- draw_primitive_pin_hole_core(current, attr);
- }
- }
-
- void KBAN_DRAW::draw_one_component_line_list_core(const COMPONENT_ELEMENT& target, uint layer, const DRAW_ATTR& attr)
- {
- const LINE_LIST& list = target.layer(layer).line_list();
- LINE_LIST::iterator i;
- TRAVERSE(list, i) {
- LINE_ELEMENT current = *i;
- current.set_ac_s(target.ac() + current.ac_s());
- current.set_ac_e(target.ac() + current.ac_e());
- draw_primitive_line_core(current, attr);
- }
- }
-
- void KBAN_DRAW::draw_one_component_layer_core(const COMPONENT_ELEMENT& target, uint layer, const DRAW_ATTR& attr)
- {
- draw_one_component_pin_list_core (target, layer, attr);
- draw_one_component_line_list_core(target, layer, attr);
- }
-
- void KBAN_DRAW::draw_one_component_layer_hole_core(const COMPONENT_ELEMENT& target, uint layer, const DRAW_ATTR& attr)
- {
- draw_one_component_pin_list_hole_core(target, layer, attr);
- }
-
- void KBAN_DRAW::draw_one_component_core(const COMPONENT_ELEMENT& target, uint active_layer, const DRAW_ATTR attr_table[])
- {
- for(uint i = 0; i < LAYER_NUMBER; i++) {
- if(i == active_layer) {
- continue;
- }
- draw_one_component_layer_core(target, i, attr_table[i]);
- }
- draw_one_component_layer_core(target, active_layer, attr_table[active_layer]);
- }
-
- void KBAN_DRAW::draw_one_component_hole_core(const COMPONENT_ELEMENT& target, uint active_layer, const DRAW_ATTR attr_table[])
- {
- for(uint i = 0; i < LAYER_NUMBER; i++) {
- if(i == active_layer) {
- continue;
- }
- draw_one_component_layer_hole_core(target, i, attr_table[i]);
- }
- draw_one_component_layer_hole_core(target, active_layer, attr_table[active_layer]);
- }
-
- void KBAN_DRAW::draw_component_list_core(const COMPONENT_LIST& target, uint layer_no, const DRAW_ATTR& attr)
- {
- COMPONENT_LIST::iterator i;
- TRAVERSE(target, i) {
- draw_one_component_layer_core(*i, layer_no, attr);
- }
- }
-
- void KBAN_DRAW::draw_component_list_hole_core(const COMPONENT_LIST& target, uint layer_no, const DRAW_ATTR& attr)
- {
- COMPONENT_LIST::iterator i;
- TRAVERSE(target, i) {
- draw_one_component_layer_hole_core(*i, layer_no, attr);
- }
- }
-
- void KBAN_DRAW::draw_kban_data_core(const KBAN_DATA& target, uint active_layer, const DRAW_ATTR attr_table[])
- {
- for(uint i = 0; i < LAYER_NUMBER; i++) {
- if(i == active_layer) {
- continue;
- }
- draw_primitive_core (target.primitive() , i, attr_table[i]);
- draw_component_list_core(target.component_list(), i, attr_table[i]);
- }
- draw_primitive_core (target.primitive() , active_layer, attr_table[active_layer]);
- draw_component_list_core(target.component_list(), active_layer, attr_table[active_layer]);
- }
-
- void KBAN_DRAW::draw_kban_data_hole_core(const KBAN_DATA& target, uint active_layer, const DRAW_ATTR attr_table[])
- {
- for(uint i = 0; i < LAYER_NUMBER; i++) {
- if(i == active_layer) {
- continue;
- }
- draw_primitive_hole_core (target.primitive() , i, attr_table[i]);
- draw_component_list_hole_core(target.component_list(), i, attr_table[i]);
- }
- draw_primitive_hole_core (target.primitive() , active_layer, attr_table[active_layer]);
- draw_component_list_hole_core(target.component_list(), active_layer, attr_table[active_layer]);
- }
-
- //
- // draw_box
- //
-
- void KBAN_DRAW::draw_box(const XY& ac1, const XY& ac2)
- { draw_box_core(ac1, ac2, m_target_attr[0]); }
-
- void KBAN_DRAW::draw_box_cursor(const XY& ac1, const XY& ac2)
- { draw_box_core(ac1, ac2, m_cursor_attr[0]); }
-
- void KBAN_DRAW::erase_box(const XY& ac1, const XY& ac2)
- { draw_box_core(ac1, ac2, m_erase_attr[0]); }
-
- //
- // draw_primitive_pin
- //
-
- void KBAN_DRAW::draw_primitive_pin(const PIN_ELEMENT& target, uint layer_no)
- {
- draw_primitive_pin_core (target, m_layer_attr[layer_no]);
- draw_primitive_pin_hole_core(target, m_erase_attr[0 ]);
- }
-
- void KBAN_DRAW::draw_primitive_pin_cursor(const PIN_ELEMENT& target)
- {
- draw_primitive_pin_core (target, m_cursor_attr[0]);
- draw_primitive_pin_hole_core(target, m_cursor_attr[0]);
- }
-
- void KBAN_DRAW::draw_primitive_pin_target(const PIN_ELEMENT& target)
- {
- draw_primitive_pin_core (target, m_target_attr[0]);
- draw_primitive_pin_hole_core(target, m_erase_attr [0]);
- }
-
- void KBAN_DRAW::erase_primitive_pin(const PIN_ELEMENT& target)
- {
- draw_primitive_pin_core(target, m_erase_attr[0]);
- }
-
- //
- // draw_primitive_line
- //
-
- void KBAN_DRAW::draw_primitive_line(const LINE_ELEMENT& target, uint layer_no)
- { draw_primitive_line_core(target, m_layer_attr[layer_no]); }
-
- void KBAN_DRAW::draw_primitive_line_cursor(const LINE_ELEMENT& target)
- { draw_primitive_line_core(target, m_cursor_attr[0]); }
-
- void KBAN_DRAW::draw_primitive_line_target(const LINE_ELEMENT& target)
- { draw_primitive_line_core(target, m_target_attr[0]); }
-
- void KBAN_DRAW::erase_primitive_line(const LINE_ELEMENT& target)
- { draw_primitive_line_core(target, m_erase_attr[0]); }
-
- //
- // draw_primitive_pin_list
- //
-
- void KBAN_DRAW::draw_primitive_pin_list(const PIN_LIST& target, uint layer_no)
- {
- draw_primitive_pin_list_core(target, m_layer_attr[layer_no]);
- draw_primitive_pin_list_hole_core(target, m_erase_attr[layer_no]);
- }
-
- void KBAN_DRAW::draw_primitive_pin_list_cursor(const PIN_LIST& target)
- {
- draw_primitive_pin_list_core(target, m_cursor_attr[0]);
- draw_primitive_pin_list_hole_core(target, m_cursor_attr[0]);
- }
-
- void KBAN_DRAW::draw_primitive_pin_list_target(const PIN_LIST& target)
- {
- draw_primitive_pin_list_core(target, m_target_attr[0]);
- draw_primitive_pin_list_hole_core(target, m_erase_attr[0]);
- }
-
- void KBAN_DRAW::erase_primitive_pin_list(const PIN_LIST& target)
- {
- draw_primitive_pin_list_core(target, m_erase_attr[0]);
- }
-
- //
- // draw_primitive_line_list
- //
-
- void KBAN_DRAW::draw_primitive_line_list(const LINE_LIST& target, uint layer_no)
- { draw_primitive_line_list_core(target, m_layer_attr[layer_no]); }
-
- void KBAN_DRAW::draw_primitive_line_list_cursor(const LINE_LIST& target)
- { draw_primitive_line_list_core(target, m_cursor_attr[0]); }
-
- void KBAN_DRAW::draw_primitive_line_list_target(const LINE_LIST& target)
- { draw_primitive_line_list_core(target, m_target_attr[0]); }
-
- void KBAN_DRAW::erase_primitive_line_list(const LINE_LIST& target)
- { draw_primitive_line_list_core(target, m_erase_attr[0]); }
-
- //
- // draw_primitive_layer
- //
-
- void KBAN_DRAW::draw_primitive_layer(const LAYER& target, uint layer_no)
- {
- draw_primitive_layer_core (target, m_layer_attr[layer_no]);
- draw_primitive_layer_hole_core(target, m_erase_attr[0 ]);
- }
-
- void KBAN_DRAW::draw_primitive_layer_cursor(const LAYER& target)
- {
- draw_primitive_layer_core (target, m_cursor_attr[0]);
- draw_primitive_layer_hole_core(target, m_cursor_attr[0]);
- }
-
- void KBAN_DRAW::draw_primitive_layer_target(const LAYER& target)
- {
- draw_primitive_layer_core (target, m_target_attr[0]);
- draw_primitive_layer_hole_core(target, m_erase_attr [0]);
- }
-
- void KBAN_DRAW::erase_primitive_layer(const LAYER& target)
- {
- draw_primitive_layer_core(target, m_erase_attr[0]);
- }
-
- //
- // draw_primitive
- //
-
- void KBAN_DRAW::draw_primitive(const PRIMITIVE& target, uint layer_no)
- {
- draw_primitive_core (target, layer_no, m_layer_attr[layer_no]);
- draw_primitive_hole_core(target, layer_no, m_erase_attr[layer_no]);
- }
-
- void KBAN_DRAW::draw_primitive_cursor(const PRIMITIVE& target, uint layer_no)
- {
- draw_primitive_core (target, layer_no, m_cursor_attr[0]);
- draw_primitive_hole_core(target, layer_no, m_cursor_attr[0]);
- }
-
- void KBAN_DRAW::draw_primitive_target(const PRIMITIVE& target, uint layer_no)
- {
- draw_primitive_core (target, layer_no, m_target_attr[0]);
- draw_primitive_hole_core(target, layer_no, m_erase_attr [0]);
- }
-
- void KBAN_DRAW::erase_primitive(const PRIMITIVE& target, uint layer_no)
- {
- draw_primitive_core(target, layer_no, m_erase_attr[0]);
- }
-
- //
- // draw_one_component
- //
-
- void KBAN_DRAW::draw_one_component(const COMPONENT_ELEMENT& target, uint active_layer)
- {
- draw_one_component_core (target, active_layer, m_layer_attr);
- draw_one_component_hole_core(target, active_layer, m_erase_attr);
- }
-
- void KBAN_DRAW::draw_one_component_cursor(const COMPONENT_ELEMENT& target, uint active_layer)
- {
- draw_one_component_core (target, active_layer, m_cursor_attr);
- draw_one_component_hole_core(target, active_layer, m_cursor_attr);
- }
-
- void KBAN_DRAW::draw_one_component_target(const COMPONENT_ELEMENT& target, uint active_layer)
- {
- draw_one_component_core (target, active_layer, m_target_attr);
- draw_one_component_hole_core(target, active_layer, m_erase_attr );
- }
-
- void KBAN_DRAW::erase_one_component(const COMPONENT_ELEMENT& target, uint active_layer)
- {
- draw_one_component_core(target, active_layer, m_erase_attr);
- }
-
- //
- // draw_component_list
- //
-
- void KBAN_DRAW::draw_component_list(const COMPONENT_LIST& target, uint layer_no)
- {
- draw_component_list_core (target, layer_no, m_layer_attr[layer_no]);
- draw_component_list_hole_core(target, layer_no, m_erase_attr[0 ]);
- }
-
- void KBAN_DRAW::draw_component_list_cursor(const COMPONENT_LIST& target, uint layer_no)
- {
- draw_component_list_core (target, layer_no, m_target_attr[layer_no]);
- draw_component_list_hole_core(target, layer_no, m_cursor_attr[0 ]);
- }
-
- void KBAN_DRAW::draw_component_list_target(const COMPONENT_LIST& target, uint layer_no)
- {
- draw_component_list_core (target, layer_no, m_target_attr[layer_no]);
- draw_component_list_hole_core(target, layer_no, m_erase_attr [0 ]);
- }
-
- void KBAN_DRAW::erase_component_list(const COMPONENT_LIST& target, uint layer_no)
- {
- draw_component_list_core(target, layer_no, m_erase_attr[layer_no]);
- }
-
- //
- // draw_kban_data
- //
-
- void KBAN_DRAW::draw_kban_data(const KBAN_DATA& target, uint active_layer)
- {
- draw_kban_data_core (target, active_layer, m_layer_attr);
- draw_kban_data_hole_core(target, active_layer, m_erase_attr);
- }
-
- void KBAN_DRAW::draw_kban_data_cursor(const KBAN_DATA& target, uint active_layer)
- {
- draw_kban_data_core (target, active_layer, m_cursor_attr);
- draw_kban_data_hole_core(target, active_layer, m_cursor_attr);
- }
-
- void KBAN_DRAW::draw_kban_data_target(const KBAN_DATA& target, uint active_layer)
- {
- draw_kban_data_core (target, active_layer, m_target_attr);
- draw_kban_data_hole_core(target, active_layer, m_erase_attr );
- }
-
- void KBAN_DRAW::erase_kban_data(const KBAN_DATA& target, uint active_layer)
- {
- draw_kban_data_core(target, active_layer, m_erase_attr);
- }
-